package org.jeecg.modules.payment.strategy;

import com.fasterxml.jackson.databind.JsonNode;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.payment.bo.PaymentParams;
import org.jeecg.modules.payment.bo.RefundParams;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author by sean
 * @desc:
 * @since 2024-08-31 星期六 13:35:29
 */
public interface IPaymentService {

//    public final static String BASE_URL = "http://sdafupplnbye.xiaomiqiu.com";

    public final static String BASE_URL = "https://1000mi.cn/jeecg-boot";
    public final static String  PAYMENT_NOTIFY_URL =  BASE_URL + "/payment/record/pay_callback"; //支付通知
    public final static String REFUND_NOTIFY_URL = BASE_URL + "/payment/refund-record/refund_callback"; //退款通知

    JsonNode payment(PaymentParams params) throws JeecgBootException;

    JsonNode payCallBack(HttpServletRequest request, String payWay, String orgCode) throws JeecgBootException;

    JsonNode refund(RefundParams params) throws JeecgBootException;

    JsonNode refundCallBack(JsonNode params) throws JeecgBootException;

    void callbackResponse(HttpServletResponse response, JsonNode params, boolean result);
}
